Skip to content

Added rate limiter to the bullMQ worker - #346

Merged
yash-pouranik merged 1 commit into
geturbackend:mainfrom
Ayush4958:rate-limit-to-consumer-api
Jul 1, 2026
Merged

Added rate limiter to the bullMQ worker#346
yash-pouranik merged 1 commit into
geturbackend:mainfrom
Ayush4958:rate-limit-to-consumer-api

Conversation

@Ayush4958

@Ayush4958 Ayush4958 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🚀 Pull Request Description

Added the rate limiter to the BullMQ worker API.

Fixes #243

🛠️ Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 UI/UX improvement (Frontend only)
  • ⚙️ Refactor / Chore

🧪 Testing & Validation

Backend Verification:

  • I have run npm test in the backend/ directory and all tests passed.
  • I have verified the API endpoints using Postman/Thunder Client.
  • New unit tests have been added (if applicable).

Frontend Verification:

  • I have run npm run lint in the frontend/ directory.
  • Verified the UI changes on different screen sizes (Responsive).
  • Checked for any console errors in the browser dev tools.

✅ Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings or errors.
  • I have updated the documentation (README/Docs) accordingly.

Summary by CodeRabbit

  • New Features
    • Added rate limiting to export processing, allowing up to 10 jobs per minute while keeping concurrent processing enabled.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 00bd45d1-4675-4a34-90c5-386fc737f6d6

📥 Commits

Reviewing files that changed from the base of the PR and between 1c0dcc1 and 3ee72af.

📒 Files selected for processing (1)
  • apps/consumer/src/workers/export.worker.js

📝 Walkthrough

Walkthrough

Adds a limiter option to the BullMQ export worker configuration, restricting job processing to a maximum of 10 jobs per 60,000 ms, alongside the existing connection and concurrency: 2 settings.

Changes

Export Worker Rate Limiting

Layer / File(s) Summary
Export worker limiter option
apps/consumer/src/workers/export.worker.js
Worker options expanded from a single-line object to a multi-line object with a limiter field set to { max: 10, duration: 60000 }.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

backend

Suggested reviewers

  • yash-pouranik

Poem

🐇 Hop, hop, slow it down a touch,
Ten jobs a minute — not too much!
The export queue now plays it cool,
A rate-limiter, the rabbit's tool.
Sixty seconds, ten at most — how neat! 🕐

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a rate limiter to the BullMQ worker.
Linked Issues check ✅ Passed The change adds BullMQ worker rate limiting, which matches the linked issue's request for consumer API rate limiting.
Out of Scope Changes check ✅ Passed The PR stays focused on worker rate limiting and does not introduce unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ayush4958

Copy link
Copy Markdown
Contributor Author

@yash-pouranik
PR is ready for review ....

@yash-pouranik
yash-pouranik merged commit ec6e78e into geturbackend:main Jul 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Adding rate limit to consumer api's

2 participants